home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 June / Ahoy_Magazine_87-06_1987_Double_L.d64 / Crafty Comp (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  383b  |  16 lines

  1. 0 rem << cd42-4 >>
  2. 1 rem ==================================
  3. 2 rem    commodares problem #38-2 :
  4. 3 print"[147]crafty comparison "
  5. 4 rem    solution by
  6. 5 rem    carmen artino
  7. 6 rem ==================================
  8. 7 print"input 4 numbers, one at a time"
  9. 10 for j=0 to 3 : input x
  10. 20 n(j)=x : next j
  11. 30 m=n(0)
  12. 40 for j=1 to 3
  13. 50 m=(abs(n(j)-m) + n(j) + m)/2
  14. 90 next j
  15. 99 print m "is the largest value"
  16.